import type { StateProvider } from './shapes/Shape';
import { stateManager } from './state-manager';

export class CanvasStateProvider implements StateProvider {
  getScale(): number {
    return stateManager.getState().scale;
  }

  getStrokeColor(): string {
    return stateManager.getState().strokeColor;
  }

  getStrokeWidth(): number {
    return stateManager.getState().strokeWidth;
  }

  // 未来可以轻松添加更多状态获取方法
}

// 全局实例
export const canvasStateProvider = new CanvasStateProvider();
